#include "wellcomeview.h"
#include "ui_wellcomeview.h"
#include "qdebug.h"

WellcomeView::WellcomeView(QWidget *parent) :
    QFrame(parent),
    ui(new Ui::WellcomeView)
{
    qDebug("aqui [0]");
    ui->setupUi(this);

    QObject::connect(ui->autenticar, SIGNAL(clicked(bool)),this, SLOT(login(bool)));
}

WellcomeView::~WellcomeView()
{
    delete ui;
}

void WellcomeView::changeEvent(QEvent *e)
{
    QFrame::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        ui->retranslateUi(this);
        break;
    default:
        break;
    }
}

void WellcomeView::login(bool value)
{
//    qDebug() << ui->matricula->text() << " " << ui->senha->text();
    emit authenticate(ui->registration->text(), ui->password->text());
}
